#include <iostream>
using namespace std;

const int N = 1e5 + 10;
int n; // 标记堆的大小
int heap[N]; // 存堆（默认大根堆）

void up(int child) // 向上调整算法(孩子向上走，比父亲大就交换)
{
    int parent = child / 2;

    while(parent >= 1 && heap[child] > heap[parent])
    {
        swap(heap[child], heap[parent]);
        // 先变形参
        child = parent;
        parent = child / 2;
    }
}
void down(int parent) // 向下调整算法(父亲向下走，比大孩子小就交换)
{
    int child = parent * 2;

    while(child <= n)
    {
        if(child + 1 <= n && heap[child + 1] > heap[child]) child++;
        if(heap[child] <= heap[parent]) return;
        swap(heap[child], heap[parent]);
        parent = child;
        child = parent * 2;
    }
}
int main()
{
    return 0;
}